home *** CD-ROM | disk | FTP | other *** search
- Path: news.tu-chemnitz.de!news
- From: hfst@hrz.tu-chemnitz.de (Hans Steffani)
- Newsgroups: comp.lang.c
- Subject: Re: Can anyone HELP with variable delaration? Please?
- Date: 3 Apr 96 06:27:34 GMT
- Organization: University of Technology Chemnitz, FRG
- Message-ID: <4jt5r4$icg@narses.hrz.tu-chemnitz.de>
- References: <4jt07b$dul@news.us.net>
- NNTP-Posting-Host: sisyphus.hrz.tu-chemnitz.de
-
- sillybug@us.net (brian skrab) writes:
-
- >Hello,
-
- >I've just started learning C programming (moving up from Pascal) and I can't
- >seem to find an answer to this question. I'm sure this is going to sound
- >stupid, but how can I declare a variable to be of a data type string? Is
- >there a data type "string"?
-
- There is no data type string. Take an array of chars which can
- be used as string as long as the last (valid) character is \0
- which means that the length of the array is one more as you need.
-
- h.f.s.
- --
- Hans Friedrich Steffani
- Institut fuer Elektrische Maschinen und Antriebe
- TU Chemnitz-Zwickau
- e-mail: hans.steffani@e-technik.tu-chemnitz.de
-